home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 1.5)
-
- TakeDictionary = { }
-
- def AddOnTakeEvent(objname, funct):
- TakeDictionary[objname] = funct
-
-
- def DelOnTakeEvent(objname):
- if TakeDictionary.has_key(objname):
- del TakeDictionary[objname]
-
-
-
- def OnTakeFunc(objname):
- if TakeDictionary.has_key(objname):
- TakeDictionary[objname]()
-
-
-
- def SaveData(filename):
- import cPickle
- funcfile = open(filename, 'wt')
- p = cPickle.Pickler(funcfile)
- d = (TakeDictionary,)
- p.dump(d)
- funcfile.close()
-
-
- def LoadData(filename):
- global TakeDictionary
- import cPickle
- funcfile = open(filename, 'rt')
- p = cPickle.Unpickler(funcfile)
- d = p.load()
- funcfile.close()
- print d
- TakeDictionary = d[0]
-
- import GameState
- GameState.ModulesToBeSaved.append(__import__(__name__))
-